$OpenBSD: patch-common_ustringutil_cpp,v 1.7 2016/04/20 18:38:41 robert Exp $
--- common/ustringutil.cpp.orig	Wed Apr 20 19:59:24 2016
+++ common/ustringutil.cpp	Wed Apr 20 20:00:13 2016
@@ -143,12 +143,18 @@ int ECSortKey::compareTo(const ECSortKey &other) const
  */
 const char* str_ifind(const char *haystack, const char *needle)
 {
+#ifndef __OpenBSD__
 	locale_t loc = createlocale(LC_CTYPE, "C");
+#endif
 	const char *needlepos = needle;
 	const char *needlestart = haystack;
 
 	while(*haystack) {
+#ifndef __OpenBSD__
 		if (toupper_l(*haystack, loc) == toupper_l(*needlepos, loc)) {
+#else
+		if (toupper(*haystack) == toupper(*needlepos)) {
+#endif
 			++needlepos;
 
 			if(*needlepos == 0)
@@ -163,7 +169,9 @@ const char* str_ifind(const char *haystack, const char
 	needlestart = NULL;
 
 exit:
+#ifndef __OpenBSD__
 	freelocale(loc);
+#endif
 
 	return needlestart;
 }
@@ -1662,8 +1670,10 @@ ECLocale::ECLocale(const ECLocale &other)
 }
 
 ECLocale::~ECLocale() {
+#ifndef __OpenBSD__
 	if (m_locale)
 		freelocale(m_locale);
+#endif
 }
 
 ECLocale &ECLocale::operator=(const ECLocale &other) {
